<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="Bookmark" href="imgs/bai.ico"/>
    <link rel="Shortcut Icon" href="imgs/bai.ico"/>
    <title>稍等…</title>
    <style type="text/css">
        body { margin: 0; padding: 0; background: #eee; }
        #body { max-width: 500px; min-width: 300px; background: #fff; text-align: center; }
        #load { margin: 0 auto; padding-top: 20px; width: 100px; height: 100px; background: #ccc; border-radius: 5px; color: #fff; display: none; }
        img { width: 60px; height: 60px; }
        #nodata { margin: 0 auto; color: #888; display: none; }
    </style>
</head>
<body>
    <div id="body">
        <div style="height: 20%;"></div>
        <div id="load">
            <img src="imgs/load.gif"/><br/>
            稍等…
        </div>
        <div id="nodata">码无效 <br> 请扫有效码</div>
    </div>
</body>
</html>


<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/view.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
    var cw = document.documentElement.clientWidth;
    var ch = document.documentElement.clientHeight;
    var userInfo = getUserInfo();
    code = getParamByUrl('code');
    var h5code = getParamByUrl('h5code');
    console.log(h5code);
    if (!h5code) {
        var ts = new Date().getTime();
        ts = ts + '' + randInt(100, 999);
        window.location.href = '/h5/?code=' + code + '&h5code=' + ts;
    }
    var loadDiv = $('#load'), ndDiv = $('#nodata');
    (function () {
        $('#body').css('width', cw).css('height', ch);
        if (code == '') {
            ndDiv.show(); loadDiv.hide();
        } else {
            ndDiv.hide(); loadDiv.show();
        }
        toH5code();
    })();
</script>